<%-- 
    Document   : register
    Created on : Nov 11, 2013, 10:51:48 PM
    Author     : Huyen
--%>

<%@page import="businesscard.entity.Thanhpho"%>
<%@page import="businesscard.DAO.ThanhphoDAO"%>
<%@page import="businesscard.DAO.QuanhuyenDAO" %>
<%@page import="businesscard.entity.Quanhuyen" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <link rel="stylesheet" href="css/style.css" type="text/css"/>
      <link rel="stylesheet" href="css/bocuc.css" type="text/css"/>
       <link rel="stylesheet" href="css/testcss.css" type="text/css"/>
         <link rel="stylesheet" href="css/mystyle.css" type="text/css"/>
         <link rel="stylesheet" href="css/botoncss.css" type="text/css"/>
         <link rel="stylesheet" href="css/trangcanhan.css" type="text/css"/>
        <script type="text/javascript" src="jquery/jquery-1.1.3.1.min.js"></script> 
        <script type="text/javascript" src="jquery/jquery-1.4.2.js"></script> 
        <script type="text/javascript" src="jquery/jquery-latest.js"  ></script>
        <title>Hibernate Page</title>
         <script type="text/javascript" src="jquery/jquery-1.8.0.min.js"></script>

      
          <script type="text/javascript" >
              
            $(function() {
                $(".inputsearch").keyup(function()
                {
                    var searchid = $(this).val();
                    var dataString = 'search=' + searchid;
                    if (searchid !== '')
                    {
                        $.ajax({
                            type: "POST",
                            url: "searchAjax.jsp",
                            data: dataString,
                            cache: false,
                            success: function(html)
                            {
                                $("#showhint").html(html).show();
                            }
                        });
                    }else{
                         jQuery("#showhint").hide();
                    }
                    return false;
                });

                jQuery("#showhint").live("click", function(e) {
                    var $clicked = $(e.target);
                    var $name = $clicked.find('.name').html();
                    var decoded = $("<div/>").html($name).text();
                    $('#searchid').val(decoded);
                });
                jQuery(document).live("click", function(e) {
                    var $clicked = $(e.target);
                    if (!$clicked.hasClass("inputsearch")) {
                        jQuery("#showhint").fadeOut();
                    }
                });
                $('#searchid').click(function() {
                    jQuery("#showhint").fadeIn();
                });
                
            });
        </script>
        <style type="text/css">
         //body{ 
         //       font-family:Tahoma, Geneva, sans-serif;
         //       font-size:18px;
         //   }
        //    .content{
        //        width:900px;
        //        margin:0 auto;
        //    }
            .name{
                width:446px;
                
                margin-top:-1px !important;
                background-color:transparent !important;
                margin-left:0;}
            #showhint
            {
                position:absolute;
                width:446px;
                padding:10px;
                display:none;
                margin-top:-1px;
                border-top:0px;
                overflow:hidden;
                border:1px #CCC solid;
                background-color: white;
                margin-left: 423px;
            }
            .show
            {
                padding:10px; 
                border-bottom:1px #999 dashed;
                font-size:15px; 
                height:50px;
            }
            .show:hover
            {
                background:#4c66a4;
                color:#FFF;
                cursor:pointer;
            }
            .name:hover
            {
                background:#4c66a4;
                color:#FFF;
                cursor:pointer;
            }
        </style>
        <script>
            var xmlhttp;

            function check(str)
            {
                xmlhttp=GetXmlHttpObject();

                if (xmlhttp==null)
                {
                    alert ("Your browser does not support Ajax HTTP");
                    return;
                }
                var url="Kiemtra.jsp";
                url=url+"?user="+str;

                xmlhttp.onreadystatechange=getOutput;
                xmlhttp.open("GET",url,true);
                xmlhttp.send(null);
            }
            function check_name(){
                var name=document.getElementById("txtUsername").value;
                if(name.trim()===""){
                    document.getElementById("name").innerHTML="<p style='color:red'>Tên đăng nhập không được bỏ trống!</p>";
                }
            }
            function check_pass()
            { 
                var pass= document.getElementById("txtPassword").value;
                var passc =document.getElementById("txtChkPassword").value;
                
                if(pass.trim()===""){
                    document.getElementById("ck_pass").innerHTML="<p style='color:red'>Mật khẩu không được bỏ trống!</p>";
                }
                else{
                    document.getElementById("ck_pass").innerHTML="<p style='color:green'>Mật khẩu hợp lệ!</p>";
                }
                if(pass!=passc)
                {
                    document.getElementById("idcheck_pass").innerHTML="<p style='color:red'>Mật khẩu phải giống nhau</p>";
                    document.getElementById("txtChkPassword").value="";
                }
                else if(passc.trim()===""){
                    document.getElementById("idcheck_pass").innerHTML="<p style='color:red'>Bạn phải nhập lại mật khẩu!</p>";
                    document.getElementById("txtChkPassword").value="";
                }
                else {	document.getElementById("idcheck_pass").innerHTML="<p style='color:green'>Mật khẩu hợp lệ!</p>";}
            }
            function check_email(){
                var email=document.getElementById("txtEmail").value;
                if(email.trim()===""){
                    document.getElementById("ck_email").innerHTML="<p style='color:red'>Email không được bỏ trống!</p>";
                }
            }
             function getOutput()
            {
                if (xmlhttp.readyState==4)
                {
                    document.getElementById("name").innerHTML=xmlhttp.responseText;
                }
            }
            function GetXmlHttpObject()
            {
                if (window.XMLHttpRequest)
                {
                    return new XMLHttpRequest();
                }
                if (window.ActiveXObject)
                {
                    return new ActiveXObject("Microsoft.XMLHTTP");
                }
                return null;
            }
           
              
        </script>
    </head>
    <body>
         <div class="bodypage">
            <!phan dau cua trang>
                <div class="top">
                    <div class="logo">
                    </div>
                    <div class="logintop">
                     <jsp:include page="login.jsp" /> 
                    </div>
                </div>
<!phan giua trang>
<div class="centerpage">
    <!phan tim>
    <div class="searchgroup">
         <%@include file='search.jsp' %>
         <div class="chontimkiem">
                <a href="index.jsp">Tìm Kiếm</a>
          
                <a href="timkiemnangcao.jsp">Tìm Kiếm Nâng Cao</a>
         </div>
    </div> 
    <div class="leftsite">
         <div class="menuweb">
              <%@include file='menuleft.jsp' %>
         </div>
    </div>       
    <!phan content>        
    <div class="content">
        <div class="khoangtrang"></div>
        <div class="timkiemnangcao">
            <h1> Tìm Kiếm Nâng Cao</h1>
            <form action="timkiem" class="formtimkiemnangcao" >
        <input type="text" name="txtLienhe" value="" placeholder="Tên Liên Hệ"/>
        <input type="text" name="txtCongty" value="" placeholder="Tên Công Ty"/>
        <div class="level"><h3>Chức vụ</h3>
        <input type="checkbox" name="ckbClevel" value="C-Level" />CEO-Level
        <input type="checkbox" name="ckbVPlevel" value="VP-Level"/>Phó chủ tịch-Level
        <input type="checkbox" name="ckbClevel" value="Diractor-Level" />Giám đốc-Level
        <input type="checkbox" name="ckbClevel" value="Manager-Level" />Quản lý-Level
        <input type="checkbox" name="ckbClevel" value="Staff-Level" />Nhân viên-Level 
        </div>
        <div class="nganh"><h3>Ngành</h3>
         <input type="checkbox" name="ckbbanhang" value="banhang" />Bán Hàng
        <input type="checkbox" name="ckbtiepthi" value="tiepthi"/>Tiếp Thị, Quảng Cáo
        <input type="checkbox" name="ckbIt" value="it" />IT và hệ thống thông tin
        <input type="checkbox" name="ckbtaichinh" value="taichinh" />Tài Chính và Quản Lý
        <input type="checkbox" name="ckbnguonnhansu" value="nguonnhansu" />Nguồn Nhân Sự
        <input type="checkbox" name="ckbhotro" value="hotro" />Hỗ Trợ
        <input type="checkbox" name="ckbnghiencuu" value="kithuatl" />Kĩ Thuật và Ngiên Cứu
         <input type="checkbox" name="ckbnganhkhac" value="khac" /> Khác
        </div>
        <div class="thanhpho"><h3>Thành Phố</h3>
            
                                <select name="txtThanhpho" placeholder="Chọn Thành Phố">
                                <%
                                    ThanhphoDAO A=new ThanhphoDAO();
                                    Thanhpho[] B=A.getAllThanhpho();
                                    for(int i=0;i<B.length;i++){
                                        %>
                                        <option  value= <%=B[i].getIdThanhpho()%> > <%=B[i].getThanhpho() %></option>
                                        <%
                                    }
                                %>
                                </select>
        </div>
        <div class="quanhuyen">
            <h3>Quận Huyện</h3><select name="cbxquanhuyen">
                <option></option>
                <option></option>
                <option></option>
             </select>                       
        </div>
                                <div class="btnasearch"><input type="submit" value="Tìm" name="btntimnangcao" /></div> 
       
        
    </form>
        
             
        </div>
    <div class="khoangtrang"></div> 
    </div> 
       
        <div class="rightsite">
        </div>
                   
</div>
<!phan cuoi trang>
        <div class="footer">
        </div>
        </div>
       
    </body>
</html>
